/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sni.org.pe.model;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Ericson
 */
@Embeddable
public class PerfilOpcionSistemaPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "idopsist")
    private BigInteger idopsist;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idperfil")
    private BigInteger idperfil;

    public PerfilOpcionSistemaPK() {
    }

    public PerfilOpcionSistemaPK(BigInteger idopsist, BigInteger idperfil) {
        this.idopsist = idopsist;
        this.idperfil = idperfil;
    }

    public BigInteger getIdopsist() {
        return idopsist;
    }

    public void setIdopsist(BigInteger idopsist) {
        this.idopsist = idopsist;
    }

    public BigInteger getIdperfil() {
        return idperfil;
    }

    public void setIdperfil(BigInteger idperfil) {
        this.idperfil = idperfil;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idopsist != null ? idopsist.hashCode() : 0);
        hash += (idperfil != null ? idperfil.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PerfilOpcionSistemaPK)) {
            return false;
        }
        PerfilOpcionSistemaPK other = (PerfilOpcionSistemaPK) object;
        if ((this.idopsist == null && other.idopsist != null) || (this.idopsist != null && !this.idopsist.equals(other.idopsist))) {
            return false;
        }
        if ((this.idperfil == null && other.idperfil != null) || (this.idperfil != null && !this.idperfil.equals(other.idperfil))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sni.org.pe.model.PerfilOpcionSistemaPK[ idopsist=" + idopsist + ", idperfil=" + idperfil + " ]";
    }
    
}
